package top.lvkun.org.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import top.lvkun.org.domain.SystemDictionaryDetail;
import top.lvkun.org.service.ISystemDictionaryDetailService;

import java.util.List;

@RestController
public class SystemDictionaryDetailController {

    @Autowired
    private ISystemDictionaryDetailService systemDictionaryDetailService;

    /**
     * 通过数据字典类型的sn查询数据字典明细数据（一般用来做下拉框）
     * @param sn
     * @return
     */
    @GetMapping("/systemDictionaryDetail/{sn}")
    public List<SystemDictionaryDetail> loadDetailsBySn(@PathVariable("sn")String sn){
        return systemDictionaryDetailService.loadDetailsBySn(sn);
    }

}
